package com.ykdl.member.kid.beans;

import java.io.Serializable;

import net.wxxr.http.interfaces.IJsonParser;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.ykdl.member.kid.models.FileMetas;

/***
 * ” 文章 “实体数据
 * @author yuanwenfei
 *
 */

public class ArticleBean implements Serializable , IJsonParser{

	private static final long serialVersionUID = -1868443316025731569L;
	
	
    private int article_id = 0;
    private String title = null;
    private int template_id = 0;
    private int days = 0; //宝宝生日日数
    private String contents = null; //内容
    private String intro = null;  
    private String created_time = null; //创建时间
    private int file_id = 0; 
    private int doctor_id = 0;
    private FileMetas file_meta = null; //图片数据 
    private String url ;
    private String baby_days ;
	public String getBaby_days() {
		return baby_days;
	}
	public String getUrl() {
		return url;
	}
	public int getArticle_id() {
		return article_id;
	}
	public void setArticle_id(int article_id) {
		this.article_id = article_id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public int getTemplate_id() {
		return template_id;
	}
	public void setTemplate_id(int template_id) {
		this.template_id = template_id;
	}
	public int getDays() {
		return days;
	}
	public void setDays(int days) {
		this.days = days;
	}
	public String getContents() {
		return contents;
	}
	public void setContents(String contents) {
		this.contents = contents;
	}
	public String getIntro() {
		return intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}

	public String getCreated_time() {
		return created_time;
	}
	public void setCreated_time(String created_time) {
		this.created_time = created_time;
	}
	public int getFile_id() {
		return file_id;
	}
	public void setFile_id(int file_id) {
		this.file_id = file_id;
	}
	public int getDoctor_id() {
		return doctor_id;
	}
	public void setDoctor_id(int doctor_id) {
		this.doctor_id = doctor_id;
	}
	public FileMetas getFile_meta() {
		return file_meta;
	}
	public void setFile_meta(FileMetas file_meta) {
		this.file_meta = file_meta;
	}
	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, ArticleBean.class);
		}
		return null;
	}
    
    
    

}
